<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  // 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'

  // Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/109.0

  // Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15


  if( navigator.userAgent.includes("Chrome") ){
    console.log("谷歌浏览器")
  }else if( navigator.userAgent.includes("Firefox") ){
    console.log("火狐浏览器")
  }else if( navigator.userAgent.includes("Safari") ){
    console.log("苹果浏览器")
  }
  
</script>
</html>